-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[W.I.P.] Ubi integration #7144
base: main
Are you sure you want to change the base?
[W.I.P.] Ubi integration #7144
Conversation
@RasonJ if this is a WIP, you can click the "Convert to Draft" and then remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to give this a spin locally, and I'm going to take a stab at the whitespace formatting ;-). My eyes hurt with the combination of 2, 4 and 8 spacing.
The default and home html views are not both on each full webpage. So, it makes sure that it’s initialized on most pages.
From: Eric Pugh ***@***.***>
Sent: Tuesday, May 14, 2024 9:29 AM
To: opensearch-project/documentation-website ***@***.***>
Cc: RasonJ ***@***.***>; Mention ***@***.***>
Subject: Re: [opensearch-project/documentation-website] [W.I.P.] Ubi integration (PR #7144)
@epugh requested changes on this pull request.
________________________________
In _layouts/default.html<#7144 (comment)>:
@@ -254,8 +254,26 @@ <h2>Related articles</h2>
anchors.add().remove('.subfooter h1, .subfooter h2');
</script>
{% endif %}
+ <script src="{{ '/assets/js/timeme.min.js' | relative_url }}"></script>
+ <script type="text/javascript">
+ // Initialize library and start tracking time
@RasonJ<https://github.com/RasonJ> why do we have this initializing twice? Also, I don't think we need the comments... Normally I love comments, but what it does appears pretty clear...
—
Reply to this email directly, view it on GitHub<#7144 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCUOS5BGSU6JWJELF2S6LZLZCI3VZAVCNFSM6AAAAABHWOAXA2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANJVHA4TIMBWGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
assets/js/ubi.js
Outdated
export async function logEvent(event){ | ||
try { | ||
//=>146.190.147.150 | ||
fetch('http://localhost:9200/ubi/docs', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is to track WiP item.
}, | ||
body: event.toJson() | ||
}).then(res => res.json()) | ||
.then(res => console.log(res)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is to track WiP item.
Co-authored-by: Miki <[email protected]> Signed-off-by: RasonJ <[email protected]>
Test implementation here: http://137.184.176.129:4000/docs/latest/ |
|
This PR can stay draft... It becomes important once we have the OpenSearch cluster that powers the documentation website migrated to managed services version 2.15 or later. That isn't planned till September (IIRC), and then this becomes something mergable. In the meantime, this is a nice example of using UBI, and we will keep it up to date and deployed on the demo server. |
Description
Integrates User Behavior Insights logging in the documentation website.
Issues Resolved
Tracks individual user interactions with the documentation website, so that we can use analytics to optimize the site utility for other users.
Events tracked:
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.